package ticketing_system.Factory;

import ticketing_system.register_login.login;
import ticketing_system.register_login.register;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        System.out.println("=============万达影院=============");
        System.out.println("1.vip注册");
        System.out.println("2.vip登陆");
        System.out.println("3.在线售票");
        System.out.print("请输入选项:");
        Scanner sc1 = new Scanner(System.in);
        int ch = sc1.nextInt();
        if (ch == 1) {
            System.out.println("=============vip注册系统=============");
            register r = new register();
            r.Add();
        } else if (ch == 2) {
            System.out.println("=============vip登陆=============");
            login L = new login();
            Object res = L.check();
            if (res ==null){
                System.exit(0);
            }
            Price_Factory pf = new Price_Factory();
            User u = pf.get_select(3);
            u.price();
            System.out.println("您的vip票正在打印中，请稍后...");
        } else if (ch == 3) {
            while (true) {
                System.out.println("=============万达影院售票系统=============");
                System.out.println("1.学生票");
                System.out.println("2.儿童票");
//                System.out.println("3.vip票");
                System.out.println("=========================================");
                Price_Factory pf = new Price_Factory();
                Scanner sc = new Scanner(System.in);
                System.out.print("请输入选项:");
                int i = sc.nextInt();
                User u = pf.get_select(i);
                u.price();
                System.out.println("正在打印您的电影票，请稍后...");
                break;
            }
        }else {
            System.out.println("亲,您的眼瞎了呢！");
        }
    }
}
